Multi-mode adapter

ABSTRACT

An adapter can be used to connect a portable electronic device to an accessory in instances where the portable electronic device and the accessory have incompatible connectors. The adapter provides two connectors, one compatible with the portable electronic device and the other compatible with the accessory. The adapter has several modes of operation. The portable electronic device selects the appropriate mode of operation for the adapter once it receives information about the accessory connected to the adapter. The portable electronic device instructs the adapter to switch to the selected mode and in response the adapter configures its internal circuitry to enable the selected mode. The portable electronic device can then communicate with the accessory via the adapter. The presence of the adapter can be transparent to the accessory.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.13/607,563, filed Sep. 7, 2012, which claims the benefit of and is anonprovisional of U.S. provisional patent application No. 61/646,043filed May 11, 2012, which is incorporated by reference. This applicationis related to U.S. provisional patent application No. 61/565,910, filedDec. 1, 2011, which is incorporated by reference. This application isalso related to U.S. provisional patent application Ser. No. 12/755,905,filed Apr. 7, 2010.

BACKGROUND

Portable electronic devices, such as portable media players, have becomeubiquitous in today's society. As they have proliferated, so have thenumber and types of hardware accessories that are designed to interactwith these portable media players. These accessories range incomplexity, including, for example, simple speaker systems and complexautomotive entertainment systems.

These accessories commonly communicate with a portable media playerusing a connector system. This connector system typically includes aplug connector on the accessory and a receptacle connector on theportable media player. A user fits the plug connector of the accessoryinto the receptacle connector of the portable media player therebyforming physical and electrical connections between the contacts of eachconnector that allow data and power to be exchanged between the devices.

Users may have multiple different portable media players. For variousreasons, these media players may have different sized connectors. Forexample, the media players may be made by different manufacturers. Also,the media players may be made by the same one manufacturer, but a newermedia player may have a more advanced, smaller sized connectorreceptacle than an older media player manufactured by the same company.

For these and other reasons, a user may encounter a situation wherehe/she has a portable media player but that media player is incompatiblewith certain accessories designed to operate with a different mediaplayer.

SUMMARY

Embodiments of the present invention are generally directed toelectronic devices. Specifically, certain embodiments of the presentinvention provide an adapter that can be used to enable an accessory tocommunicate with a portable electronic device in situations where theaccessory and the portable electronic device cannot be directlyconnected to each other.

When an accessory and a portable electronic device have incompatibleconnectors, an adapter of some sort may be needed to connect thesedevices together so that they can communicate with each other. Anadapter according to an embodiment of the present invention includes twoconnectors, one of which is compatible with the accessory and the otheris compatible with the portable electronic device. This allows theadapter to act as an intermediary device to relay signals to and fromthe accessory and the portable electronic device. Thus, the adapterenables the accessory to be “connected” to the portable electronicdevice.

In order for the adapter to be able to work with multiple accessories,the adapter has multiple modes of operation depending on the accessorytype. Once an accessory is connected to the adapter (which is connectedto the portable electronic device), the adapter sends the receivedaccessory information to the portable electronic device. The portableelectronic device determines the type of accessory based on theaccessory information and then selects an operation mode for theadapter. The portable electronic device then instructs the adapter toenable the selected mode. Once the portable electronic device receivesconfirmation from the adapter that the selected mode is enabled, it canthen communicate with the accessory via the adapter. The presence of theadapter is completely transparent to the accessory in most instances.

In a particular embodiment of a present invention, a portable electronicdevice is provided that detects connection of the adapter. The adaptermay inform the portable electronic device that the adapter has anadditional port that can accept an accessory. The portable electronicdevice can then instruct the adapter to enable the additional port. Oncean accessory is connected to the additional port, the portableelectronic device may receive information about the accessory from theadapter. The portable electronic device may then determine the type ofaccessory connected and may select and appropriate mode of operation forthe adapter. The portable electronic device may then instruct theadapter to enable the selected mode. Once the selected mode is enabledby the adapter, the portable electronic device can communicate with theaccessory via the adapter using a set of messages.

The following detailed description together with the accompanyingdrawings will provide a better understanding of the nature andadvantages of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an electronic system that is improved by theincorporation of an embodiment of the present invention.

FIG. 2 illustrates an electronic system that includes an adapteraccording to an embodiment of the present invention that allowscommunication between an accessory and a portable electronic device.

FIG. 3 illustrates a plug connector that is included in an adapteraccording to one embodiment of the present invention.

FIG. 4A illustrates an exemplary pin-out of plug connector shown in FIG.3 according to an embodiment of the present invention.

FIG. 4B illustrates another exemplary pin-out of plug connector shown inFIG. 3 according to an embodiment of the present invention.

FIG. 5A illustrates a receptacle connector that is compatible withconnector shown in FIG. 3.

FIGS. 5B and 5C are diagrams illustrating a pin-out arrangement of areceptacle connector according to two different embodiments of theinvention configured to mate with plug connectors 152 as shown in FIGS.4A and 4B, respectively.

FIG. 6 is a functional block diagram of a portable electronic deviceaccording to an embodiment of the present invention.

FIG. 7 is a functional block diagram of an accessory according to anembodiment of the present invention.

FIG. 8 illustrates an exemplary pin-out of a 30-pin receptacle connectorthat is included in the adapter according to one embodiment of thepresent invention.

FIG. 9 is a functional block diagram of an adapter according to anembodiment of the present invention.

FIG. 10 is a block diagram of a system illustrating variouscommunication channels according to an embodiment of the presentinvention.

FIG. 11 is a table listing some of the messages that can be exchangedbetween the adapter and the portable electronic device according to anembodiment of the present invention.

FIG. 12 illustrates signal path in the “bypass” mode of the adapteraccording to an embodiment of the present invention.

FIG. 13 illustrates signal path in the “analog audio” mode of theadapter according to an embodiment of the present invention.

FIG. 14 illustrates signal path in the “bridge” mode of the adapteraccording to an embodiment of the present invention.

FIG. 15 is a state diagram representing some of the states of theadapter according to an embodiment of the present invention;

FIG. 16 is a flow diagram of a process for adapter operation accordingto an embodiment of the present invention.

FIGS. 17A and 17B illustrate a flow diagram of a process for adapteroperation according to another embodiment of the present invention.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIG. 1 illustrates a hardware accessory 120 that a user may want toconnect to two different portable electronic devices 110 and 130 inorder to, for example, extend the functionality of each of devices 110and 130. In this example, portable electronic device 110 is a firstportable media player that includes a receptacle connector 114 and atouchscreen 116. Portable media player 110 may be an iPod®, iPhone®, orsimilar device designed and manufactured by Apple Inc. of Cupertino,Calif., but it is to be understood that the present invention is notlimited to any particular type of portable electronic media player orother device.

Accessory 120 may be an automotive radio, transmitter, cable,audio/video receiver, storage device, clock radio, or other device.Accessory 120 may include a plug connector 122 that includes a pluralityof contacts (not shown) that carry electrical signals for one or more ofdata, audio, video, control functions and power. In one embodiment, plugconnector 122 includes between 4 and 30 contacts but the presentinvention is not limited to any particular contact count orconfiguration.

Receptacle connector 114 includes a cavity in which a plurality of pinsor contacts (not shown) are positioned. Plug connector 122 andreceptacle connector 114 are designed to mate with each other tophysically and electrically couple the contacts in connector 114 withthe contacts within connector 122 so that signals can be transmittedbetween the contacts. Thus, plug connector 122 and receptacle connector114 can be said to be “compatible” with each other. When the connectors114 and 122 are mated, portable media player 110 can exchangeinformation with accessory 120 to enable, for example, allowing theaccessory to play music that is stored on media player 110.

Various portable media players and other electronic devices may includereceptacle connectors that are of different shape, size or pinconfiguration than receptacle connector 114, in which case these otherreceptacle connectors may not be compatible with or may be“incompatible” with plug connector 122. A plug connector on an accessorymay not be compatible with a receptacle connector on a portableelectronic device or portable media player because the plug connector isdesigned to mate with products made by a first manufacturer, while theportable media player is instead made by a second manufacturer. Also, aportable media player manufacturer may change the design of a receptacleconnector for some products, such as newer generation products. Forexample, a smaller connector may be incorporated into newer generationproducts to enable the design of smaller portable media players. Also, aconnector with a different pin-out may support new data communicationprotocols that could not be supported by an older legacy connector.

There are at least two types of incompatibility that may arise between aplug connector on an accessory and a receptacle connector on a hostelectronic device/portable electronic device. First, the receptacleconnector may be physically incompatible with the plug connector, thatis, they may have incompatible sizes and literally cannot be connectedtogether in a mechanical sense. FIG. 1 provides an example of connectorsthat are physically incompatible with each other. Specifically, aportable electronic device 130 is shown in FIG. 1 that includes areceptacle connector 134 that is considerably smaller than receptacleconnector 114 incorporated within portable electronic device 110. Plugconnector 122 is too large to fit within connector 134 and thusconnectors 134 and 122 are “incompatible” connectors that cannot bemated with each other.

As a second example of incompatible connectors, a plug connector on anaccessory may not be compatible with a receptacle connector on aportable electronic device because one or more signals or power supplyoutputs on either the plug connector or receptacle connector areincompatible with inputs on the other end. This may occur at one or morelevels of signaling. For example, a physical layer used to transmit andreceive signals may be incompatible between the accessory and theportable electronic device. Specifically, signal voltages and otherphysical parameters may be different. Also, at the transport level,which specifies signal frequency and other parameters, may be differentbetween the devices. The packet structure layer, which defines howmessages and data are formatted, and multi-packet logic levels, whichdefine sequences of messages, may also vary among devices. In someembodiments, a pin on the plug connector may be assigned to a function(e.g., analog audio) and a corresponding pin on the receptacle connectormay be assigned to a different function (e.g., digital audio).

Embodiments of the present invention provide an adapter that allowscommunication between a portable electronic device and an accessory ininstances where a receptacle connector on the portable electronic deviceand a plug connector on an accessory are incompatible in one or both ofthese ways. One example is shown in FIG. 2 which illustrates anelectronic system according to an embodiment of the present invention.

As illustrated in FIG. 2, portable electronic device 130 has areceptacle connector 134. Accessory 120 includes a plug connector 122that is physically larger than connector 134. Thus, accessory 120 cannotbe directly connected to portable electronic device 130. FIG. 2 alsoshows an adapter 150 that may be used to connect accessory 120 andportable electronic device 130. Adapter 150 includes a plug connector152 that has a form factor that is compatible with connector 134 ofportable electronic device 130. Adapter 150 also includes anotherconnector 154, which is a receptacle connector that is of the same formfactor as and compatible with plug connector 122 of accessory 120. Thus,adapter 150 can be used to physically and electrically connect portableelectronic device 130 and accessory 120 even though they may haveincompatible connectors. Adapter 150 includes a housing 160 in whichboth the connectors are formed. Adapter 150 includes control circuitry156 that controls the operation of the adapter. In one embodiment, plugconnector 152 may be an eight-contact (plus a ground contact) in-linedual orientation connector.

FIG. 3 illustrates a perspective view of plug connector 152 according toan embodiment of the present invention. Plug connector 152 includes abody 303 and a tab portion 304 that extends longitudinally away frombody 303 in a direction parallel to the length of the connector. Body303 can be part of housing 160 of adapter 150 or can be a structuralcomponent of connector 152 that enables the connector to be attached tohousing 160. Additionally, in some embodiments, adapter 150 may includea cable that extends from housing 160 to plug connector 152 providingmore flexibility for the plug connector to be mated with a portablemedia device.

Tab 304 is sized to be inserted into a corresponding receptacleconnector, such as receptacle connector 134 of portable media player 130shown in FIG. 2, during a mating event and includes a first contactregion 306 a formed on a first major surface 304 a and a second contactregion 306 b (not shown in FIG. 3) formed at a second major surface 304b (also not shown) opposite surface 304 a. Surfaces 304 a, 304 b extendfrom a distal tip of the tab to a spine 309 that, when tab 304 isinserted into a corresponding receptacle connector, abuts a housing ofthe receptacle connector or portable electronic device the receptacleconnector is incorporated in. Tab 304 also includes first and secondopposing side surfaces 304 c, 304 d that extend between the first andsecond major surfaces 304 a, 304 b. In one particular embodiment, tab304 is 6.6 mm wide, 1.5 mm thick and has an insertion depth (thedistance from the tip of tab 304 to spine 309) of 7.9 mm.

The structure and shape of tab 304 is defined by a ground ring 305 thatcan be made from stainless steel or another hard conductive material.Connector 152 includes retention features 302 a, 302 b (not shown)formed as curved pockets in the sides of ground ring 305 that double asground contacts. Body 303 is shown in FIG. 3 in transparent form (viadotted lines) so that certain components inside the body are visible. Asshown, within body 303 is a printed circuit board (PCB) 307 that extendsinto ground ring 305 between contact regions 306 a and 306 b towards thedistal tip of connector 152. One or more integrated circuits (ICs), suchas Application Specific Integrated Circuit (ASIC) chips 308 a and 308 b,can be operatively coupled to PCB 307 to provide information regardingconnector 152 and adapter 150 and/or to perform specific functions, suchas authentication, identification, contact configuration and current orpower regulation.

As an example, in one embodiment an ID module is embodied within an ICoperatively coupled to the contacts of connector 152. The ID module canbe programmed with identification and configuration information aboutthe connector and/or its associated accessory/adapter that can becommunicated to a host device during a mating event. As another example,an authentication module programmed to perform an authenticationroutine, for example a public key encryption routine, with circuitry onthe host device can be embodied within an IC operatively coupled toconnector 152. The ID module and authentication module can be embodiedwithin the same IC or within different ICs. As still another example, inembodiments where adapter 150 enables an accessory to charge the hostdevice connected to connector 152, a current regulator can be embodiedwithin one of IC's 308 a or 308 b. The current regulator can beoperatively coupled to contacts that are able to deliver power to chargea battery in the portable electronic device and regulate currentdelivered over those contacts to ensure a constant current regardless ofinput voltage and even when the input voltage varies in a transitorymanner.

Bonding pads 310 can also be formed within body 303 near the end of PCB307. Each bonding pad can be connected to a contact or contact pairwithin regions 306 a and 306 b. Wires (not shown) can then be solderedto the bonding pads to provide an electrical connection from thecontacts to circuitry within adapter 150. In some embodiments, however,bonding pads are not necessary and instead all electrical connectionsbetween the contacts and components of connector 152 and other circuitrywithin adapter 150 are made through traces on a PCB that the circuitryis coupled to and/or by interconnects between multiple PCBs withinadapter 150.

As shown in FIG. 3 eight external contacts 106(1) . . . 106(8) arespaced apart along a single row in contact region 306 a. A similar setof eight contacts are spaced apart along a single row in contact region306 b. The two rows of contacts are directly opposite each other andeach contact in contact region 306 a is electrically connected to acorresponding contact in contact region 306 b on the opposite side ofthe connector. Contacts 106(1) . . . 106(8) can be used to carry a widevariety of signals including digital signals and analog signals as wellas power and ground.

FIG. 4 depicts one particular implementation of a pin-out for plugconnector 152 according to one embodiment of the invention. The pin-outshown in FIG. 4 includes two contacts 106(4), 106(5) that areelectrically coupled together to function as a single contact dedicatedto carrying power; an accessory ID contact 106(8); an accessory powercontact 106(1); and four data contacts 106(2), 106(3), 106(6) and106(7). Power contacts 106(4), 106(5) can be sized to handle anyreasonable power requirement for a portable electronic device, and forexample, can be designed to carry between 3-20 Volts from an accessoryto charge a portable electronic device connected to connector 152. Powercontacts 106(4), 106(5) are positioned in the center of contact regions306 a, 306 b to improve signal integrity by keeping power as far away aspossible from the sides of ground ring 305.

Accessory power contact 106(1) can be used for an accessory power signalthat provides power from the host to an accessory. The accessory powersignal is typically a lower voltage signal than the power in signalreceived over contacts 106(4) and 106(5), for example, 3.3 volts ascompared to 5 volts or higher. The accessory ID contact provides acommunication channel that enables the host device to authenticate theaccessory and enables the accessory to communicate information to thehost device about the accessory's capabilities as described in moredetail below.

Data contacts 106(2), 106(3), 106(6) and 106(7) can be used to enablecommunication between the host and accessory using one or more ofseveral different communication protocols. Data contacts 106(2) and106(3) are positioned adjacent to and on one side of the power contacts,while data contacts 106(6) and 106(7) are positioned adjacent to but onthe other side of the power contacts. The accessory power and accessoryID contacts are positioned at each end of the connector. The datacontacts can be high speed data contacts that operate at rate that istwo or three orders of magnitude faster than any signals sent over theaccessory ID contact which makes the accessory ID signal lookessentially like a DC signal to the high speed data lines. Thus,positioning the data contacts between the power contacts and the IDcontact improves signal integrity by sandwiching the data contactsbetween contacts designated for DC signals or essentially DC signals.

FIG. 4A depicts another particular implementation of a pin-out for plugconnector 152 according to another embodiment of the invention. Theconnector illustrated in FIG. 4A is also a reversible connector in thatbased on the orientation in which the connector is mated with acorresponding connector of a host device, either the contacts on thesurface 306 a or 306 b are in contact with the contacts in thecorresponding connector of the host device. As illustrated in FIG. 4A,there are eight contacts arranged on an upper surface of a PCB 310 andeight contacts arranged on a lower surface of PCB 310.

Connector 152 of FIG. 4A includes two contacts 106(1) and 106(12) thatcan function as accessory ID contacts to carry the identificationsignals between the accessory and the portable electronic device.Contacts 106(1) and 106(12) are electrically connected to each other.The connector can have four pairs of data contacts, (a) 106(2) and106(3), (b) 106(6) and 106(7), (c) 106(10) and 106 (12), and (d) 106(14)and 106(15). In this particular embodiment, opposing data contacts,e.g., 106(2) and 106(10), are electrically connected to each other viaPCB 310 as illustrated in FIG. 4A. Connector 152 of FIG. 4A furtherincludes host power contacts 106(4) or 106(13) that may be electricallyconnected to each other. Host power contacts 106(4) or 106(13) carrypower to the host device that is mated with connector 152. For example,plug connector 152 may be part of a power supply system designed toprovide power to the host device. In this instance, either contact106(4) or 106(13) may carry power from the power supply to the hostdevice, e.g., to charge a battery in the host device.

Connector 152 of FIG. 4A may further include accessory power contacts106(5) and 106(16) that may be electrically connected to each other,e.g, via PCB 310. Accessory power contacts carry power from the hostdevice to a connected accessory. For example, in some instances, anaccessory connected to the host device may not be self-powered and mayderive its power from the host device. In this instance, the host devicecan supply power to the accessory over either of the accessory contacts,depending on the orientation of connector 152. Connector 152 of FIG. 4Amay further include two ground contacts 106(8) and 106(9) electricallyconnected to each other. The ground contacts provide a ground path forconnector 152.

FIG. 5A depicts cross-sectional view of one embodiment of a receptacleconnector 500 that connector 152 can be coupled with. Receptacleconnector 500 can, for example, be included in portable media player 130as connector 134. As shown in FIG. 5A, receptacle connector 500 includeseight contacts 146(1) . . . 146(8) that are spaced apart in a singlerow. The contacts are positioned within a cavity 547 that is defined bya housing 542. Receptacle connector 500 also includes side retentionmechanisms (not shown) that engage with retention features 302 a, 302 bin connector 152 to secure connector 152 within cavity 547 once theconnectors are mated. Receptacle connector 500 also includes twocontacts 148(1) and 148(2) that are positioned slightly behind the rowof signal contacts and can be used to detect when connector 152 isinserted within cavity 547 and detect when connector 152 exits cavity547 when the connectors are disengaged from each other.

When tab 304 of connector 152 is fully inserted within cavity 547 ofreceptacle connector 500 during a mating event between the plug andreceptacle connectors, each of contacts 106(1) . . . 106(8) from one ofcontact regions 106 a or 106 b are physically coupled to one of contacts146(1) . . . 146(8) depending on the insertion orientation of connector152 with respect to connector 500. Thus, contact 146(1) will bephysically connected to either contact 106(1) or 106(8) depending on theinsertion orientation; data contacts 146(2), 146(3) will connect witheither data contacts 106(2), 106(3) or with data contacts 106(7), 106(6)depending on the insertion orientation, etc.

FIGS. 5B and 5C illustrate pin-out configuration for a receptacleconnector 500 according to two different embodiments of the presentinvention. In one embodiment, receptacle connector 500 has a pin-out asshown in FIG. 5B that matches pin-out of connector in FIG. 4A and inanother embodiment, receptacle connector 500 has a pin-out as shown inFIG. 5C that matches pin-out of connector of FIG. 4B. In each of FIGS.5B and 5C, the ACC1 and ACC2 pins are configured to mate with either theaccessory power (ACC_PWR) or accessory ID (ACC_ID) pins of the plugconnector depending on the insertion orientation of plug connector, thepair of Data A contacts is configured to mate with either the pair ofData 1 contacts or the pair of Data 2 contacts of the plug connector,and the P_IN (power in) pin or pins are configured to mate with the HostPower contact or contacts of the plug connector. Additionally, in thepin-out of FIG. 5C, the GND contact is configured to mate with the GNDcontact in the plug connector.

Referring again to FIG. 2, receptacle connector 154 of adapter 150 maybe a 30-pin connector compatible with Apple iPod®, iPad®, and iPhone®devices. FIG. 8 illustrates a pin-out arrangement for connector 154according to an embodiment of the present invention.

FIG. 6 is a functional block diagram of a portable electronic deviceaccording to an embodiment of the present invention. Portable electronicdevice 602 (e.g., implementing portable electronic device 130 of FIG. 1)can provide computing, communication and/or media playback capability.Portable electronic device 602 can include a processor 610, storagedevice 612, user interface 614, power manager 616, network interface618, and accessory input/output (I/O) interface 620. Portable electronicdevice 602 can also include other components (not explicitly shown) toprovide various enhanced capabilities.

Storage device 612 can be implemented, e.g., using disk, flash memory,or any other non-transitory or non-volatile storage medium. In someembodiments, storage device 612 can store media assets such as audio,video, still images, or the like, that can be played by portableelectronic device 602. Storage device 612 can also store otherinformation such as a user's contacts (names, addresses, phone numbers,etc.); scheduled appointments and events; notes; and/or other personalinformation. In some embodiments, storage device 612 can store one ormore application programs to be executed by processor 610 (e.g., videogame programs, personal information management programs, media playbackprograms, etc.).

User interface 614 can include input devices such as a touch pad, touchscreen, scroll wheel, click wheel, dial, button, switch, keypad,microphone, or the like, as well as output devices such as a videoscreen, indicator lights, speakers, headphone jacks, or the like,together with supporting electronics (e.g., digital-to-analog oranalog-to-digital converters, signal processors, or the like). A usercan operate input devices of user interface 614 to invoke thefunctionality of portable electronic device 602 and can view and/or hearoutput from portable electronic device 602 via output devices of userinterface 614.

Processor 610, which can be implemented as one or more integratedcircuits (e.g., a conventional microprocessor or microcontroller), cancontrol the operation of portable electronic device 602. In someembodiments, single-core processors, multi-core processors, and/ormulti-processor systems may be implemented. In various embodiments,processor 610 can execute a variety of programs in response to programcode and can maintain multiple concurrently executing programs orprocesses. At any given time, some or all of the program code to beexecuted can be resident in processor 610 and/or in storage media suchas storage device 612. Processor 610 can also operate other programs tocontrol other functions of portable electronic device 602. In someembodiments, processor 610 implements a protocol daemon and otherprograms to manage communication with one or more connected accessories(e.g., adapter 150 and accessory 120); examples are described below. Inother embodiments, processor 610 can determine the type of accessoryconnected to the adapter and based on that information instruct theadapter to enable a specific mode of the adapter.

Power manager 616 provides power management capability for portableelectronic device 602. For example, power manager 616 can deliver powerfrom a battery (not explicitly shown) to accessory I/O interface 320 vialine 617 and to other components of portable electronic device 602(power connections not shown). Power manager 616 can also receive powervia accessory I/O interface 620 and line 619 and deliver received powerto various components of portable electronic device 602; power receivedfrom an accessory can also be delivered to the battery, thereby allowingthe battery to be recharged via accessory I/O interface 620. In someembodiments, power manager 616 can be implemented using programmable orcontrollable circuits operating in response to control signals generatedby program code executing on processor 610 or as a separatemicroprocessor or microcontroller.

In some embodiments, power manager 616 is responsive to signals from asensor (not explicitly shown) in accessory I/O interface 620. The sensorcan generate a signal indicative of the type of accessory connected, andpower manager 616 can use this information to determine, e.g., whetherto distribute power from the battery or power received from accessoryI/O interface 620. Power manager 616 can also provide other powermanagement capabilities, such as regulating power consumption of othercomponents of portable electronic device 602 based on the source andamount of available power, monitoring stored power in the battery andgenerating user alerts if the stored power drops below a minimum level,and so on.

Network interface 618 can provide voice and/or data communicationcapability for portable electronic device 602. In some embodimentsnetwork interface 618 can include radio frequency (RF) transceivercomponents for accessing wireless voice and/or data networks (e.g.,using cellular telephone technology, advanced data network technologysuch as 3G, EDGE, or 4G (e.g., LTE network), WiFi (IEEE 802.11 familystandards), or other mobile communication technologies, or anycombination thereof), GPS receiver components, and/or other components.In some embodiments network interface 618 can provide wired networkconnectivity (e.g., Ethernet) in addition to or instead of a wirelessinterface. Network interface 618 can be implemented using a combinationof hardware (e.g., antennas, modulators/demodulators, encoders/decoders,and other analog and/or digital signal processing circuits) and softwarecomponents.

Accessory I/O interface 620 can allow portable electronic device 602 tocommunicate with various accessories. For example, accessory I/Ointerface 620 can support connections to an adapter, a computer, anexternal speaker dock or media playback station, a digital camera, aradio tuner (e.g., FM, AM and/or satellite), an in-vehicle entertainmentsystem, an external video device, card reader, disc reader, or the like.In accordance with some embodiments of the invention, accessory I/Ointerface 620 can support connection to multiple accessories in a daisychain configuration, allowing portable electronic device 602 to manageconcurrent communication with multiple accessories.

In some embodiments, accessory I/O interface 620 can include areceptacle connector, such as a connector 500 as illustrated in FIG. 5,as well as supporting circuitry for the connector. The connector canprovide connections for power and ground as well as for various wiredcommunication interfaces such as Universal Serial Bus (USB), FireWire(IEEE 1394 standard), and/or universal asynchronous receiver/transmitter(UART). The connector can also provide connections for audio and/orvideo signals, which may be transmitted to or from portable electronicdevice 602 in analog and/or digital formats. Thus, accessory I/Ointerface 620 can support multiple communication channels, and a givenaccessory can use any or all of these channels.

FIG. 7 is a functional block diagram of an accessory according to anembodiment of the present invention. Accessory 706 (e.g., implementingaccessory 120 of FIG. 2) can include controller 740, user input device742, audio/video output device 744, power manager 746, power supply 748and I/O interface 750. Accessory 706 is representative of a broad rangeof accessories that can have their own functionality and be connected toportable electronic device 302 via an intermediary such as adapter 150.Accessories can vary widely in capability, complexity, and form factor.Various accessories may include components not shown in FIG. 7,including but not limited to storage devices (disk, flash memory, etc.)with fixed or removable storage media; camera components such as lenses,image sensors, and controls for same (e.g., aperture, zoom, exposuretime, frame rate, etc.); microphones for recording audio (either aloneor in connection with video recording); and so on.

Controller 740 can include, e.g., a microprocessor or microcontrollerexecuting program code to perform various operations associated withaccessory 706. For example, where accessory 706 incorporates a soundand/or video system, program code executed by controller 740 can includeprograms for digital audio decoding, analog or digital audio processing,and the like.

User input device 742 may include user-operable controls such as a touchpad, touch screen, scroll wheel, click wheel, dial, button, switch,keyboard, keypad, microphone, or the like. A user can operate thevarious input controls of user interface 734 to invoke functionality ofaccessory 706, and such functionality may include exchanging controlsignals, data, or other communications with portable electronic device602 either directly or via an intermediary such as adapter 150. In someembodiments, the communications sent and received by accessory 706 canbe independent of whether an intermediary is present.

In some embodiments, accessory 706 can also provide output devices suchas audio/video output device 744. In some embodiments, audio/videooutput device 744 can include speakers and/or connection ports forconnecting external speakers or headphones; a video screen and/or aconnection port for connecting an external video screen, indicatorlights, or the like, together with supporting electronics (e.g.,digital-to-analog or analog-to-digital converters, signal processors orthe like). These components can be coupled to receive audio and/or videosignals via I/O interface 750. Such components can allow the user toview and/or hear output from accessory 706.

Power manager 746 can provide power management capability for accessory706. For example, power manager 746 can be configured to receive powerfrom a power supply 748. In some embodiments, power supply 748 caninclude a connection to an external power source (e.g., the standardelectric grid); for example, power supply 748 can include an AC-DCconverter that can be internal or external to accessory 706. In otherembodiments, power supply 748 can include a battery or other energystorage device. Power manager 746 can deliver power from power supply748 to various components of accessory 706. In addition, in someembodiments, power manager 746 can deliver power to upstreamaccessories, e.g., adapter 150, via I/O interface 750.

I/O interface 750 can allow accessory 706 to communicate with portableelectronic device 602 either directly or through an intermediary such asadapter 150. In some embodiments, I/O interface 750 can include aconnector that can mate directly with a connector included in adapter150, such as a 30-pin connector similar to the one found on variousiPod® products. Such a connector can be used to supply power to portableelectronic device 602 or receive power from portable electronic device602, to receive audio and/or video signals in analog and/or digitalformats, and to communicate information via various interfaces such asUSB, UART, and/or FireWire. All these signals can be communicated via anintermediary such as adapter 150.

It will be appreciated that the system configurations and componentsdescribed herein are illustrative and that variations and modificationsare possible. The portable electronic device and/or the accessory mayhave other capabilities not specifically described herein (e.g., mobilephone, global positioning system (GPS), broadband data communication,Internet connectivity, etc.).

FIG. 9 is a functional block diagram of an adapter 900 according to anembodiment of the present invention. Adapter 900 can be implemented asadapter 150 of FIG. 2. Adapter 900 includes a first connector 902 and asecond connector 904. In some embodiments, first connector 902 can beimplemented as plug connector 152 and second connector 904 can beimplemented as connector 154 of FIG. 2. Both connectors are eitherformed in housing 906 or attached to housing 906. Adapter 900 alsoincludes a first USB device 908 and a second USB device 910. The two USBdevices enable coupling of signals between connector 902 and 904 invarious modes of operation described below. A USB multiplexer 912 aidsin selective activation of various signal paths within adapter 900.

Controller 914 can include, e.g., a microprocessor or microcontrollerexecuting program code to perform various operations associated withadapter 900. Controller 914 controls the operation of adapter 900including, but not limited to receiving instructions from a connectedportable electronic device for changing an operation mode of adapter900, selectively activating certain components/signal paths inconjunction with USB multiplexer 912 to place adapter 900 into therequested mode, and generally controlling the signal flow to and fromconnectors 902 and 904.

Logic circuitry 916 may include a ASIC that receives signals fromconnector 904, interprets the received signals and provides theinformation to controller 914, which can then perform an action based onthe received information. Logic circuitry 916 can also receive inputsfrom controller 914 and communicate information to a connected accessoryvia connector 904.

Adapter 900 may also process signals related to USB, analog audio, UART,power, and exchange of messages associated with an accessory protocolbetween a connected portable electronic device via connector 902 and aconnected accessory via connector 904. In addition, adapter 900 may alsoprocess one or more of the signals as illustrated in FIGS. 4 and 8.

It will be appreciated that the system configurations and components foradapter 900 described herein are illustrative and that variations andmodifications are possible. The adapter may have other components notspecifically described herein. Further, while the adapter is describedherein with reference to particular blocks, it is to be understood thatthese blocks are defined for convenience of description and are notintended to imply a particular physical arrangement of component parts.Further, the blocks need not correspond to physically distinctcomponents. Blocks can be configured to perform various operations,e.g., by programming a processor or providing appropriate controlcircuitry, and various blocks might or might not be reconfigurabledepending on how the initial configuration is obtained. Embodiments ofthe present invention can be realized in a variety of devices includingelectronic devices implemented using any combination of circuitry andsoftware.

In some embodiments, adapter 900 can enable accessories having aconnector that is incompatible with the connector of a portableelectronic device, to operate with the portable electronic device. In aparticular embodiment, adapter 900 can have multiple modes of operationdepending on which accessory is connected to it. As described above,there are various accessories that can be used with a portableelectronic device; however, each of these accessories may have differentoperating requirements. Operating requirements for an accessory caninclude but are not limited to power level, type of input signals, typeof output signals, configurations, etc. In order for the adapter to beable to act as an intermediary between the various accessories and aportable electronic device, the adapter must be able to communicateaccessory information and signals to and from the portable electronicdevice. In order to accomplish this, adapter 900 may have multiple modesof operation. Each mode of operation is described in turn below.

In order to understand the various modes of operation of the adapter, itis first beneficial to understand the mechanism that the adapter may useto relay messages back and forth between an accessory and a portableelectronic device.

As used herein, an adapter and a portable electronic device, or anaccessory, are “connected” whenever a communication channel isestablished between their respective mating interfaces and“disconnected” when the channel is terminated. Such connection can beachieved via direct physical connection, e.g., with mating connectors.

In some embodiments, an adapter, a portable electronic device, and anaccessory can communicate with each other by exchanging messages anddata according to a portable electronic device accessory protocol, alsoreferred to herein as an “accessory protocol.” The messages and data canbe communicated using the transport medium provided by the relevantinterfaces of each of these devices. Where the accessory and theportable electronic device communicate via an intermediary such asadapter 900, the communication takes place across multiple links, e.g.,a link from I/O interface 750 of accessory 706 to connector 904 ofadapter 900, then a link from connector 902 of adapter 900 to accessoryI/O interface 620 of portable electronic device 602. Communication inthe reverse direction via these links is also possible. In someembodiments, each link uses the same transport, but this is notrequired. Each link can use the accessory protocol.

The accessory protocol defines a format for messages to be exchangedbetween the portable electronic device and any accessories connectedthereto. For instance, the accessory protocol may specify that eachmessage is sent in a packet with a header and an optional payload. Theheader provides basic information (e.g., a start indicator, length ofthe packet, and a message identifier identifying a type of message),while the payload provides any parameters or data associated with themessage; the amount of associated data can be different for differentmessages, and some messages may provide for variable-length payloads. Insome embodiments, the messages may be defined such that any particularmessage identifier is valid in only one direction. The packet can alsoinclude error-detection or error-correction codes as known in the art.

In some embodiments, every accessory (including accessory 706 andadapter 900) and every portable electronic device 602 that use theaccessory protocol support at least a minimum set of “general” messagesthat are common to the portable electronic device and all accessories.The general messages can include messages enabling the portableelectronic device and the accessory and the adapter to identify andauthenticate themselves to each other and to provide general informationabout their respective capabilities, including which (if any) othermessagees each supports. The general messages can also includeauthentication messages that the portable electronic device can use toverify the purported identity and capabilities of the accessory and theadapter (or vice versa), and the accessory or adapter (or portableelectronic device) may be blocked from invoking certain (or all)messages if the authentication is unsuccessful.

As previously noted, and as described below, adapter 900 caninteroperate with portable electronic device 602 and also provide aconnection to another accessory 706. FIG. 10 illustrates an operatingprinciple of an embodiment of the present invention. Portable electronicdevice 1002 is connected to adapter 1004 via a physical port 1102, andadapter 1004 is connected to accessory 1006 via a physical port 1104. Inone embodiment, physical port 1102 can be implemented using accessoryI/O interface 620 of portable electronic device 602 and connector 902 ofadapter 900, and physical port 1104 can be implemented using connector904 of adapter 900 and I/O interface 750 of accessory 706.

Through physical ports 1102 and 1104, a virtual port 1106 is created forcommunication between accessory 1006 and portable electronic device1002. Accessory 1006 can send messages or other signals to portableelectronic device 1002 using virtual port 1106 by sending the messagesor other signals to adapter 1004 via physical port 1104. In someembodiments, accessory 1006 can send exactly the same messages andsignals that it would send directly to portable electronic device 1002.Adapter 1004 detects signals from accessory 1006 and forwards them toportable electronic device 1002 via physical port 1102 in such a fashionthat portable electronic device 1002 can determine that the signalsoriginated from accessory 1006 rather than adapter 1004. Similarly,portable electronic device 1002 can send messages or other signals toaccessory 1006 by sending them to adapter 1004 via physical port 1102 insuch a fashion that adapter 1004 can determine that the signals shouldbe delivered to accessory 1006. Adapter 1004 can forward such signalsvia physical port 1104 in such a fashion that they appear to accessory1006 to have come directly from portable electronic device 1002. Inother words, the existence of adapter 1004 can be completely transparentto accessory 1006.

Concurrently with implementing virtual port 1106, adapter 1004 can alsointeract with portable electronic device 1002, invoking functionality ofportable electronic device 1002 and/or having its own functionalityinvoked by portable electronic device 1002, generally independently ofaccessory 1006. For example, adapter 1004 can send messages or othersignals to portable electronic device 1002 via physical port 1102 insuch a fashion that portable electronic device 1002 can determine thatthe signals originated from adapter 1004. Similarly, portable electronicdevice 1002 can send messages or other signals to adapter 1004 viaphysical port 1102 in such a fashion that adapter 1004 can determinethat it should process these signals itself rather than forwarding themto accessory 1006. Such operations between portable electronic device1002 and adapter 1004 can be transparent to accessory 1006.

It is to be understood that the term “accessory” as used herein refersto any electronic device capable of being connected to andinteroperating with a portable electronic device. The term “adapter” asused herein refers generally to any accessory that also provides anadditional connection interface for another accessory. Thus, an adapteris a type of accessory, but not all accessories need be adapters.

In some embodiments, virtual port 1106 of FIG. 10 is implemented usingmessages of the accessory protocol exchanged between portable electronicdevice 1002 and adapter 1004. FIG. 11 is a table 1150 listing messagesexchanged between the portable electronic device, the adapter, and theaccessory according to an embodiment of the present invention. Thesemessages can be implemented as part of a portable electronic deviceaccessory protocol as general messages or another message type asdesired. In table 1150, the direction of each message is indicated asA→P (for messages sent by an adapter to a portable electronic device) orP→A (for messages sent by a portable electronic device to an adapter).The payload refers to any parameters or data associated with eachmessage.

The AddPortPresent message can be sent by adapter 1004 to portableelectronic device 1002 to inform the portable electronic device that theadapter has at least one additional port. In some embodiments, unlessthe adapter sends this message, the portable electronic device mayignore any message sent using the virtual port. The portable electronicdevice may acknowledge receipt of this message. Upon acknowledgement bythe portable electronic device, the adapter and the portable electronicdevice may communicate using the virtual port messages described below.Although not explicitly shown, adapter 1004 and portable electronicdevice 1002 may also exchange authentication messages in order toauthenticate with each other.

The GetVPOptions message can be sent by adapter 1004 to portableelectronic device 1002 to determine whether portable electronic device1002 supports virtual port behavior, in particular, communication withmultiple connected accessories in a daisy chain. The RetVPOptionsmessage can be sent in response by portable electronic device 1002 witha byte code indicating whether portable electronic device 1002 supportsvirtual port behavior. In some embodiments, if adapter 1004 is connectedto a portable electronic device that does not support virtual portbehavior, adapter 1004 can disable interface/connector 904.

The VPEvent message can be sent by adapter 1004 to portable electronicdevice 1002 to notify portable electronic device 1002 of the status ofthe additional port, e.g., interface/connector 904. The payload of theVPEvent message can include a port type indicator, an event typeindicator, and a structured bit field associated with the indicated porttype and event type. The port type indicator can be used to specify thetype (or types) of signals that adapter 1004 can exchange with accessory1006. For example, if the accessory protocol specifies UART and USB asoptional transport mechanisms, adapter 1004 can indicate to portableelectronic device 1002 whether it can forward each of these signaltypes.

The event type indicator can be used to specify what type of informationabout the port state is being communicated. For example, in someembodiments, the accessory protocol provides that the connector includesa pair of identification pins that can be used by the portableelectronic device to identify the type of connected accessory based on aresistance applied across the identification pins by the accessory. Whenaccessory 1006 connects to interface 904 of adapter 1004, adapter 1004can measure the resistance across the identification pins and report theresistance value to portable electronic device 1002 using an “accessorydetect” event type indicator. Similarly, when an accessory disconnects,adapter 1004 can send a VPEvent message with the “accessory detect”event type indicator and a resistance value indicating an open circuit.Portable electronic device 1002 can process such messages as if it haddirectly measured the resistance on pins of its own connector.

As another example, in some embodiments where port 1104 is implementedusing a multi-pin connector, an accessory need not connect to all pinsof that connector. For example, if the connector includes pins for adigital signal protocol such as USB or FireWire but a particularaccessory does not use these protocols, the corresponding pins may bedisconnected. Likewise, the connector can include various pins forproviding analog and/or digital audio and video output signals from theportable electronic device or delivering such signals to the portableelectronic device. If a particular accessory does not use audio or videosignaling or a particular format associated with certain pins, thesepins may be disconnected.

In such embodiments, when accessory 1006 connects to interface 904/port1104, adapter 1004 can determine which pins are actually connected andreport the information to portable electronic device 1002 using aVPEvent message with a “characteristics” event type indicator. The bitfield associated with this event type can include a bit mask for thevarious optional signals, allowing adapter 1004 to indicate which signalpins are or are not connected through to accessory 1006. In embodimentswhere adapter 1004 itself does not support connections on all pins, thesame bit mask can be used with the bits for any unsupported pins set tothe disconnected state regardless of whether the lack of support iswithin adapter 1004 or due to accessory 1006. In some embodiments,adapter 1004 can selectively connect or disconnect some of the signalpaths from its port 1102 to its port 1104, and the “characteristics”event type can include a data field indicating which signals areselectively connectable.

In some embodiments, adapter 1004 can send a VPEvent message uponestablishing that portable electronic device 1002 supports virtual portbehavior to provide the initial status of port 1104. In this instance,the VPEvent message may include a port ID that uniquely identifies port1104. This port ID may be used later by the VPControl, VPDataSend, andVPDataReceive messages. Adapter 1004 can send subsequent VPEventmessages asynchronously to notify portable electronic device 1002 ofstatus changes, e.g., if an accessory connects or disconnects. In someembodiments, adapter 1004 may send the VPEvent message multiple times ifit does not receive an acknowledgement from portable electronic device1002 that it received the message. In some embodiments, until theVPEvent message is acknowledged by portable electronic device 1002,adapter 1004 cannot send any additional messages.

The VPControl message can be sent by portable electronic device 1002 toinstruct adapter 1004 to set its port 1104 to a desired state. Forexample, portable electronic device 1002 can instruct adapter 1004 toenable or disable port 1104, or to change the state of any selectivelyconnectable signal paths. Thus, for example, portable electronic device1002 can instruct adapter 1004 to enable an accessory power path in port1104.

The VPDataSend message can be sent by portable electronic device 1002 toinstruct adapter 1004 to forward a message of the accessory protocol“downstream” to a connected accessory, e.g., accessory 1006. The payloadof the VPDataSend message can include the message to be forwarded plusany associated data. In some embodiments, the payload can also includeother components of a complete accessory protocol packet (e.g., packetheader, start byte, error correction code); adapter 1004 can simplyforward the payload as received to accessory 1006. In other embodiments,the payload includes only the message and data, and adapter 1004 cangenerate the surrounding packet structure before forwarding the packetto accessory 1006. In either case, accessory 1006 can receive a standardaccessory protocol packet just as it would if directly connected to aportable electronic device. In some embodiments, adapter 1004 does notread or process the payload of a VPDataSend message. It simplyunpackages the VPDataSend packet and transmits the payload to accessory1006.

The VPDataReceive message can be sent by adapter 1004 to forward anaccessory protocol packet containing a message (and possibly associateddata) “upstream” from accessory 1006 to portable electronic device 1002.The payload can include the message being forwarded plus any associateddata. In some embodiments, adapter 1004 forwards the received packetintact (including, e.g., header, start byte, error correction code) asthe payload of the VPDataReceive message; in other embodiments, adapter1004 can extract the received packet's message and data and include thisinformation in the payload of the VPDataReceive message. In someembodiments, adapter 1004 does not read or process any messages sent byaccessory 1006; it simply packages them into VPDataReceive messages andforwards them to portable electronic device 1002. Thus, accessory 1006need not specify a destination for any message it sends.

The ChangeMode message can be sent by the portable electronic device tothe adapter. As mentioned above, the adapter is capable of operating inmultiple modes. This message can instruct the adapter to enable aparticular mode. The payload for this message can be a mode ID thattells the adapter which mode to change to. Each operational mode of theadapter can be assigned a unique ID. Specific example of modes andselection of nodes is described below.

The ChangeModeComplete message can be sent by the adapter to theportable electronic device informing the portable electronic device thatthe mode change has been completed. The payload of theChangeModeComplete message can be the mode ID of the currently activemode of the adapter. In some embodiments, the ChangeModeComplete messagecan be sent in response to the ChangeMode message. Once the portableelectronic device receives the ChangeModeComplete message, it can verifythat the adapter has enabled the same mode that it had requested via theChangeMode message.

It will be appreciated that the messages described herein areillustrative and that variations and modifications are possible.

In some embodiments, each forwarded message to or from accessory 1006 isencapsulated in a single VPDataSend or VPDataReceive message packet. Forexample, the host device may generate a first message that includes asecond message that is intended for the accessory. That is the secondmessage is encapsulated by the first message. The first message is thensent to the adapter. The adapter strips the encapsulation and extractsthe second message and forwards the second message to the accessory. Inthe reverse direction, the accessory may generate a message intended forthe host device and send that message to the adapter. The adapter maythen encapsulate that message with another message generated by theadapter and send the other message to the host device. The host devicecan then strip the encapsulation of the other message and recover themessage sent by the accessory. In other embodiments, the messages beingforwarded to or from the accessory can be treated as a byte stream, anda VPDataSend or VPDataReceive message packet may include part of aforwarded message, parts of two forwarded messages, or all of oneforwarded message and part of another; that is, the number of VPDataSendor VPDataReceive messages need not match the number of messagescommunicated to or from accessory 1006.

As mentioned above, adapter 1004/900 can operate in multiple modesdepending on the type of accessory connected to port 1104/connector 904.Initially, when the adapter is connected to the portable electronicdevice, all connections of port 1104 are floating or disabled. Uponconnection to the portable electronic device, the adapter identifies andauthenticates itself to the portable electronic device. Uponauthentication (or concurrent to authentication) the adapter sets up thevirtual port connection with the portable electronic device using themessages described above. Thereafter, the portable electronic device mayinstruct the adapter to enable port 1104. Once port 1104 is enabled, theadapter is ready to send and receive information via port 1104.

As noted above, adapter 1004 can operate in multiple modes to providedifferent combination of signals to accessory 1006. Some exampled willnot be described.

FIG. 12 is a diagram illustrating a signal path within adapter 1004 whenthe adapter is operating in a “bypass” mode according to an embodimentof the present invention. After the initial configuration describedabove, the adapter is ready to receive accessory 1006 connected via port1104. Upon completion of the identification and authentication processdescribed above, the portable electronic device may instruct the adapterto transition to the bypass mode. In some embodiments, the bypass modemay be the default mode that the adapter is placed in upon connectionwith the portable electronic device.

Once accessory 1006 is connected to port 1104, adapter 1004 forwards theaccessory identification information to portable electronic device 1002.Portable electronic device 1002 interprets the accessory identificationinformation and determines what type of accessory is accessory 1006. Forexample, consider that accessory 1006 is a USB charging unit, e.g.,power supply, car charger, etc. that can provide charging voltage toportable electronic device 1002.

Upon connection of charging unit 1006 to the adapter, the adapter sendsthe identification information, e.g., a resistor ID, of the chargingunit to the portable electronic device, e.g., using the VPEvent message.The portable electronic device then determines that a USB charging unitis connected to the adapter and instruct the adapter to operate in thebypass mode, e.g., by sending the ChangeMode message. In the bypassmode, the USB multiplexer 912 connects the active pins from connector904 to pins in connector 902. In this mode, adapter 1004 acts as apass-through device. Portable electronic device 1002 can then receivepower over the VBUS line from charging unit 1006. In this mode, thevirtual port messages described above may be communicated over the UARTpathway illustrated in FIG. 12. In this instance, the presence of theadapter is transparent to the accessory.

FIG. 13 illustrates a mode in which the adapter supports transfer ofanalog audio from the portable electronic device to the accessory. Thepresent disclosure refers to this mode as the “analog audio mode.” Inthis instance, upon connection of the accessory to the adapter, theportable electronic device determines that the accessory, e.g., aspeaker dock, needs analog audio input. Based on this determination,portable electronic device 1002 instructs adapter 1004 to enable theanalog audio mode. In this mode, adapter 1004 enables USB device 908 andconnects to portable electronic device 1002 via the audio pin ofconnector 904 by reconfiguring the connections in USB Mux 912. USBdevice 908 acts as a USB audio synchronization device. Portableelectronic device 1002 outputs digital audio to the adapter via audiopin of connector 902. Adapter 1004 then converts the digital audio usingUSB device 908 and a digital to analog converter 1304 and outputs theanalog audio over the line_out pin of connector 904. The accessory canthen receive the analog audio and output the audio using, e.g., itsspeakers.

If the accessory is also able to provide charging voltage to theportable electronic device, the portable electronic device may alsoinstruct the adapter to enable a charge path via the USB signal in thismode. In order to provide charging voltage to portable electronic device1002, adapter 1004 enables USB device 910 and couples it to the USB pinof connector 904. This enables portable electronic device 1002 toreceive charging voltage over the VBUS line as illustrated in FIG. 13.

FIG. 14 illustrates yet another mode of operation of adapter 1004according to an embodiment of the present invention. This mode isreferred to herein as the “Bridge” mode. This mode may support anaccessory 1006 that needs to communicate with the portable electronicdevice using the accessory protocol over the USB data line and alsorequests analog audio.

Initially when accessory 1006 is connected to adapter 1004, the adaptermay be in the “bypass” mode discussed above and accessory 1006 candirectly communicate with portable electronic device 1002. As part ofthis communication, the portable electronic device can determine thetype of accessory connected and its operating requirements. If portableelectronic device 1002 determines that accessory 1006 requestscommunication using the accessory protocol over the USB line and analogaudio input, the portable electronic device instructs the adapter toenable the bridge mode, e.g., using the ChangeMode message. The portableelectronic device then enters a host mode. In some embodiments, theadapter may disable connector 904 (thereby disconnecting the accessory)prior to entering the bridge mode. After entering the bridge mode, theadapter then re-enables connector 904 so that the accessory cancommunicate with the portable electronic device. In this mode, USBdevice 908 is coupled to the audio output of the portable electronicdevice via USB Mux 912. USB device 908 is also coupled to USB device 910via controller 914. USB device 910 is coupled to the USB data line ofconnector 904 via USB Mux 912. USB device 908 is also coupled to anaudio input pin of connector 904 via controller 914 in order to processthe audio data.

In operation, USB device 908 may receive data from the portable mediadevice via connector 902. USB device 908 cannot communicate directlywith USB device 910. Hence, controller 914 receives the data from USBdevice 908 and forwards the data to USB device 910. In some embodiments,the two USB devices may operate using different protocols. For example,USB device 908 may be a full-speed USB device while USB device 910 maybe a high speed USB device. Alternatively, one of the USB devices mayuse version 1.1 protocol and the other USB device may use version 2.0 or3.0 protocol. In such instances, direct data transfer between the twoUSB devices may not be possible. Controller 914 acts as a “bridge” toproperly convert the received data to the appropriate format beforesending it to the portable media device and/or the accessory.

In operation, the portable electronic device outputs digital audio datausing a USB audio output pin of connector 902. The digital audio data isprocessed by USB device 908 and microcontroller 914 and converted toanalog audio. The analog audio is then input to the accessory via theaudio input pin of connector 904.

If accessory 1006 wants to send any messages to the portable electronicdevice, e.g., for invoking some functionality of the portable electronicdevice or any other digital data, the message/data is output over theUSB data pins of connector 904. The message/data is then processed byUSB device 910 and sent to controller 914. Controller 914 acts as abridge to transfer the message/data to USB device 908. USB device 908then communicates the message/data to portable electronic device 1002over the same USB audio pin of connector 902. If the portable electronicdevice wants to send message/data to the accessory, then the same pathin reverse can be followed. Thus, portable electronic device 1002 canoutput audio and other non-audio data using the same USB data lines andaccessory 1006 can receive the messages/non-analog audio data on its USBlines and receive analog audio data on its audio input line.

A USB device can only communicate with a USB host. In the bridge mode,both the accessory and the host device act as USB hosts in order tocommunicate with the two USB devices 910 and 908, respectively. Asdescribed above, the two USB devices cannot directly communicate witheach other. In the bridge mode, the adapter effectively communicatesdata between the accessory and the host device by properly processingthe data as needed.

The adapter can also operate in a “disconnect” mode where connector 904(or port 1104) of the adapter is disabled. In this mode, even if anaccessory is physically attached to connector 904, the accessory appearsto the portable electronic device as “offline” and vice versa. Theadapter may enter this disconnect mode when transitioning between theother modes described above. For example, if the adapter is in the“bypass” mode and receives an instruction from the portable electronicdevice to enter into the “bridge” mode, the adapter may first enter the“disconnect” mode and then enter the “bridge” mode. While the adapter isin the disconnect mode, the portable electronic device may configure itsinternal settings, e.g., configure MUX 912, in order to get ready tocommunicate with the accessory once the adapter transitions to thedesired mode. For example, if the adapter is in the “bypass” mode theportable electronic device acts as a device that communicates directlywith the accessory. But if the portable electronic device iscommunicating with the accessory with the adapter in the “bridge” mode,then the portable electronic device acts as host device for theaccessory. Thus, while the adapter is transitioning from the “bypass”mode to the “bridge” mode, the portable electronic device can configureits internal settings so as to appear as a host device to the accessory.

FIG. 15 is a state diagram illustrating the various modes of operationof the adapter according to an embodiment of the present invention. Whenthe adapter is connected to the portable electronic device, the adaptermay receive power from the portable electronic device and be in apowered on state 1502 ready to authenticate itself to the portableelectronic device. Thereafter, the adapter can identify and authenticateitself to the portable electronic device. As part of the authenticationprocess or following the authentication process, the adapter may set upthe virtual port connection with the portable electronic device and bein an idle/ready state 1504. In some embodiments, the adapter mayautomatically transition to a default state 1506 upon being inidle/ready state 1504 for a predetermined time. As described above, insome embodiments, the default state may be the “bypass” mode. From thedefault state 1506, the adapter may either enter “bridge” mode state1510 or the “analog audio” mode state 1508 after an accessory isconnected to the adapter. The change of state can be effected via e.g.,the ChangeMode message. Upon disconnection of the accessory from theadapter, the adapter returns to default state 1506 and waits for thenext mode change message.

It will be appreciated that the various states described in reference toFIG. 15 are for illustrative purposes only. One skilled in the art willrealize that various other states are possible depending on the adaptercapabilities.

As described above, the adapter is capable of operating in multiplemodes depending on which accessory is connected to the adapter. Theportable electronic device instructs the adapter to switch to aparticular mode based on the accessory connected to the adapter. Theportable electronic device receives information about the accessory viathe adapter and based on that information, the portable electronicdevice determines the type of accessory and identifies a mode that theadapter should be in so that the portable electronic device maycommunicate with the accessory. The information that the portableelectronic device may use to determine the type of the accessory mayinclude an accessory identifier, configuration information of theaccessory, capabilities information of the accessory and the like. Oncethe portable electronic device selects a mode for the adapter, it sendsan instruction to the adapter to switch to that selected mode. In someembodiments, the adapter may cycle through the “disconnect” mode beforeentering the selected mode. In other embodiments, the adapter maydirectly enable the selected mode without cycling through the disconnectmode.

FIG. 16 is a flow diagram of a process 1600 for operating an adapteraccording to an embodiment of the present invention. Process 1600 can beperformed by, e.g., portable electronic device 130 of FIG. 2.

At step 1602, the portable electronic device can detect connection of anadapter, e.g., via connector 902 illustrated in FIG. 9. Once the adapteris connected to the portable electronic device, the adapter can identifyitself to the portable electronic device and authenticate itself to theportable electronic device at step 1604. Thereafter, at step 1606, theportable electronic device may receive a message from the adapterinforming the portable electronic device that the adapter has anadditional port that may be used to connect to other accessories. In oneembodiment, the adapter may send this information using theAddPortPresent message. Once the portable electronic device knows thatthe adapter has an additional port, it may instruct the adapter toenable the additional port at step 1608. As described above, until theportable electronic device instructs the adapter to enable theadditional port, the adapter may by default maintain the additional portin a disabled or “disconnect” mode. In other embodiments, the adaptermay automatically enable the additional port once the authentication iscompleted.

Thereafter the portable electronic device may wait to receiveinformation from the adapter on whether an accessory is connected to theadditional port. At step 1610, the portable electronic device may checkwhether it has received information from the adapter about an accessoryconnected to the additional port. As discussed above, the adapter maysend identification information of the accessory to the portableelectronic device. Based on that information the portable electronicdevice may determine whether an accessory is indeed connected to theadditional port of the adapter. If the portable electronic device doesnot receive any accessory information from the adapter, the portableelectronic device waits at step 1612 and keeps checking the data inputlines on its connector to determine if the adapter has forwarded anyaccessory information.

If at step 1610 it is determined that the accessory is connected to theadditional port of the adapter, i.e. the portable electronic devicereceives accessory information from the adapter, the portable electronicdevice determines, at step 1614, the type of accessory connected byanalyzing the received accessory information. Once the portableelectronic device determines the type of the accessory, it then selectsa mode of operation for the adapter at step 1616. As described above,the adapter is capable of operating in multiple modes and the portableelectronic device selects one of the multiple modes based on the type ofthe accessory. The portable electronic device then instructs the adapterto enable the selected mode at step 1618, e.g., using the ChangeModemessage. Once the adapter enables the selected mode, the portableelectronic device can receive a confirmation from the adapter, at step1620, that the adapter has indeed enabled the requested mode.

It should be appreciated that the specific steps illustrated in FIG. 16provide a particular method of operating the adapter according to anembodiment of the present invention. Other sequences of steps may alsobe performed according to alternative embodiments. For example,alternative embodiments of the present invention may perform the stepsoutlined above in a different order. Moreover, the individual stepsillustrated in FIG. 16 may include multiple sub-steps that may beperformed in various sequences as appropriate to the individual step.Furthermore, additional steps may be added or removed depending on theparticular applications. One of ordinary skill in the art wouldrecognize many variations, modifications, and alternatives. For example,in some embodiments, prior to step 1606, the portable electronic devicemay receive a message from the adapter asking whether the portableelectronic device supports virtual port messages (i.e. messages tocommunicate with an accessory connected to the portable electronicdevice via the adapter), e.g., using the GetVPOptions message. Theportable electronic device may respond indicating whether it supports ordoes not support virtual port messages, e.g., using the RetVPOptionsmessage.

FIGS. 17A and 17B illustrate a flow diagram of a process 1700 foroperating an adapter according to another embodiment of the presentinvention. Process 1700 can be performed, e.g., by adapter 150 of FIG.2.

At step 1702, the adapter can detect connection with a portableelectronic device. Once connected to the portable electronic device, theadapter can identify and authenticate itself to the portable electronicdevice at step 1704. Thereafter, at step 1706, the adapter can informthe portable electronic device that it has an additional port andprovide the current status of that port to the portable electronicdevice. In some embodiments, the adapter may initially keep theadditional port in a disabled mode. Thereafter, the adapter may receiveinstructions from the portable electronic device to enable theadditional port and in response to the instructions; the adapter mayenable the additional port at step 1708. In addition, optionally, theadapter may enter into a first (or default) mode of operation at step1710. For example, in some embodiments, the “bypass” mode may bedesignated as the default mode. However, any one of the multipleoperating modes of the adapter described above (or any other availablemode) can be designated as the default mode.

At step 1712, the adapter may detect connection of an accessory via theadditional port. Once the accessory is connected, the adapter may readaccessory information or the accessory may send the accessoryinformation to the adapter at step 1714. In some embodiments, theaccessory information may include identification information that mayhelp the portable electronic device to identify the accessory. Theadapter communicates the accessory information to the portableelectronic device at step 1716. Based on the accessory information, theportable electronic device makes a determination of what type ofaccessory is connected to the adapter and also determines a mode ofoperation for the adapter so that the portable electronic device maycommunicate with the accessory. It is to be noted that at this instant,the portable electronic device may be unable to communicate with theaccessory. Once the portable electronic device determines that theadapter needs to be in a second mode, the adapter receives instructionsfrom the portable electronic device to enable the second mode, at step1718.

Upon receiving the instruction to change modes, the adapter mayoptionally, at step 1720, check to see if the currently active mode(i.e. the first mode) is same as the requested mode (i.e. second mode).If the currently active mode is same as the requested mode, the adaptermay inform the portable electronic device that it is already in therequested mode. Referring now to FIG. 17B, if the requested mode is notthe same as the current mode, the adapter may enable a third mode, e.g.,disconnect mode, at step 1722, for a predetermined amount of time.During this time, the portable electronic device may also configure itsinternal circuitry to be able to communicate with the accessory. Theaccessory may see a momentary loss of connection with the adapter and/orthe portable electronic device. At step 1724, the adapter may enable therequested (second) mode and thereafter inform the portable electronicdevice, at step 1726, that it has enabled the requested. Thereafter theadapter may relay message between the portable electronic device and theaccessory at step 1728 in conformance with the selected mode.

It should be appreciated that the specific steps illustrated in FIG. 17provide a particular method of operating the adapter according to anembodiment of the present invention. Other sequences of steps may alsobe performed according to alternative embodiments. For example,alternative embodiments of the present invention may perform the stepsoutlined above in a different order. Moreover, the individual stepsillustrated in FIG. 17 may include multiple sub-steps that may beperformed in various sequences as appropriate to the individual step.Furthermore, additional steps may be added or removed depending on theparticular applications. One of ordinary skill in the art wouldrecognize many variations, modifications, and alternatives.

Embodiments of the present invention may greatly enhance the userexperience by making it easier to connect an accessory to a portablemedia device in the instance that they have non-compatible connectors.For example, since the adapter initializes in a state where theaccessory connector is in a disabled state, it does not matter in whatorder the user connects the accessory, the adapter, and the portablemedia device. The user may either connect the adapter to the portablemedia device followed by connecting the accessory to the adapter or theuser may first connect the accessory to the adapter and then connect theadapter to the portable media device. Also, the portable media devicedetermines the correct mode of operation for the adapter and instructsthe adapter to switch to that mode. This relieves the user from theadditional step of selecting the appropriate mode, which can beespecially useful for users who are not very technology savvy. Inaddition, the automatic selection of the adapter mode ensures that thecorrect mode is selected resulting in less operator errors which may beintroduced if the user has to select the mode.

As described above, the portable media device determines the mode ofoperation of the adapter. In instances where a change to the modeselection rules is to made, such a change can be easily effected byupdating the firmware of the portable media device without having tochange the adapter firmware. The adapter can continue to operate in themode selected by the portable media device. In some embodiments, theadapter communicates with the portable media device using only the UARTdata pins. In this instance, whenever the portable media device receivesa message over the USB data pins, the portable media device can concludethat the message was generated by the accessory and not the adapter.This is an additional way for the portable media device to determine theorigin of a message. In this embodiment, the VPDataSend and/or theVPDataReceive messages may not be needed.

In some embodiments, the portable media device may support multipleaccessory protocols. Therefore if the accessory uses an older version ofthe accessory protocol, the portable media device can still communicatewith the accessory using the adapter and techniques described above.

In the embodiments described above, the portable media deviceinstructions the adapter to enable a particular mode. However this isnot the only way of communicating with the accessory. In otherembodiments, the adapter may detect connection of an accessory, receivethe accessory information, and determine which mode is the mostappropriate for communicating with the accessory. The adapter may thenchange its mode accordingly and then inform the portable media devicethat a particular mode is enabled and that the accessory is now ready tocommunicate with the portable media device. In this instance, theadapter may use similar techniques as described above to determine theproper mode of operation based on the accessory information.

In still other embodiments, the adapter can receive the accessoryinformation and instruct the portable media device to change to aparticular mode of operation of the portable media device. In someembodiments, the adapter may then also change its own mode of operationto match the portable media devices' mode. In this instance, the adaptermay use similar techniques as described above to determine the propermode of operation based on the accessory information.

Embodiments of the present invention can be realized using anycombination of dedicated components and/or programmable processorsand/or other programmable devices. The various processes describedherein can be implemented on the same processor or different processorsin any combination. Where components are described as being configuredto perform certain operations, such configuration can be accomplished,e.g., by designing electronic circuits to perform the operation, byprogramming programmable electronic circuits (such as microprocessors)to perform the operation, or any combination thereof. Further, while theembodiments described above may make reference to specific hardware andsoftware components, those skilled in the art will appreciate thatdifferent combinations of hardware and/or software components may alsobe used and that particular operations described as being implemented inhardware might also be implemented in software or vice versa.

Computer programs incorporating various features of the presentinvention may be encoded and stored on various computer readable storagemedia; suitable media include magnetic disk or tape, optical storagemedia such as compact disk (CD) or DVD (digital versatile disk), flashmemory, and other non-transitory media. Computer readable media encodedwith the program code may be packaged with a compatible electronicdevice, or the program code may be provided separately from electronicdevices (e.g., via Internet download or as a separately packagedcomputer-readable storage medium).

Thus, although the invention has been described with respect to specificembodiments, it will be appreciated that the invention is intended tocover all modifications and equivalents within the scope of thefollowing claims.

What is claimed is:
 1. An adapter comprising: a first connector to matewith a corresponding connector to a host device; a second connector tomate with a corresponding connector on an accessory; and a housing tosupport for the first connector and the second connector and enclosinginternal circuitry, the internal circuitry comprising: a first universalserial bus device selectively coupled to the first connector; a seconduniversal serial bus device selectively coupled to the second connector;and a controller coupled between the first universal serial bus deviceand the second universal serial bus device, wherein the adapter isconfigurable to operate in a bypass mode where a universal serial buspath is configured to route signals between the first connector and thesecond connector bypassing the first universal serial bus device and thesecond universal serial bus device, wherein the adapter is furtherconfigurable to operate in an analog audio mode where a universal serialbus path is configured to route signals from the first connector to thefirst universal serial bus device; and wherein the adapter is furtherconfigurable to operate in a bridge mode where a first universal serialbus path is configured to route signals from the first connector to thefirst universal serial bus device and a second universal serial bus pathis configured to route signals from the second connector to the second.2. The adapter of claim 1 wherein the adapter further comprises amultiplexer, and when the adapter is configured to operate in a bypassmode, the multiplexer routes the universal serial bus path from thefirst connector to the second connector.
 3. The adapter of claim 2wherein when the adapter is in the analog audio mode, the firstuniversal serial bus device provides an output to a digital-to-analogconverter, wherein the digital to analog converter provides an analogaudio signal to the second connector.
 4. The adapter of claim 3 whereinwhen the adapter is in the bridge mode, the controller provides acommunication path from the first universal serial bus device to thesecond universal serial bus device.
 5. The adapter of claim 1 whereinwhen the adapter is in the bypass mode, the adapter provides a universalserial bus path for the host device and accessory to communicatedirectly with each other.
 6. The adapter of claim 5 wherein when theadapter is in the analog audio mode, the host device provides an analogaudio signal to the accessory.
 7. The adapter of claim 6 wherein whenthe adapter is in the analog audio mode, the host device provides anaudio signal to the accessory by providing a universal serial bus signalto the first universal serial bus device via the first connector, wherethe universal serial bus device provides a signal to the controller,which provides an audio signal to the digital-to-analog converter, whichprovides the analog signal to the accessory via the second connector. 8.The adapter of claim 6 wherein when the adapter is in the bridge mode,the adapter provides a universal serial bus path for the host device andaccessory to communicate with each other and the host device provides ananalog audio signal to the accessory.
 9. The adapter of claim 8 whereinwhen the adapter is in the bridge mode, the adapter provides a universalserial bus path for the host device and accessory to communicate witheach other through the first universal serial bus device and the seconduniversal serial bus device.
 10. An adapter comprising: a firstconnector to mate with a corresponding connector to a host device; asecond connector to mate with a corresponding connector on an accessory;and a housing to support for the first connector and the secondconnector and enclosing internal circuitry, wherein the internalcircuitry comprises: a universal asynchronous receiver/transmitter pathto provide adapter identification and authentication information for theadapter to the host device; and a universal serial bus path to initiallyprovide accessory identification information from the accessory to thehost device when the adapter is in a bypass mode, wherein depending onthe accessory identification information, the adapter either remains inthe bypass mode where the accessory provides a communication pathbetween the host and the accessory, or the adapter changes to one of aplurality of alternative modes.
 11. The adapter of claim 10 wherein theplurality of alternative modes comprises an analog audio mode, the hostdevice provides an analog audio signal to the accessory.
 12. The adapterof claim 11 wherein the plurality of alternative modes comprises abridge mode where the adapter provides a universal serial bus path forthe host device and accessory to communicate with each other and thehost device provides an analog audio signal to the accessory.
 13. Theadapter of claim 11 wherein the adapter further comprises a multiplexer,and when the adapter is configured to operate in a bypass mode, amultiplexer routes the universal serial bus path from the firstconnector to the second connector.
 14. The adapter of claim 13 whereinwhen the adapter is in an analog audio mode, a first universal serialbus device provides an output to a digital-to-analog converter, whereinthe digital to analog converter provides an analog audio signal to thesecond connector.
 15. The adapter of claim 14 wherein when the adapteris in a bridge mode, a controller provides a communication path from thefirst universal serial bus device to a second universal serial busdevice.
 16. An adapter comprising: a first connector to mate with acorresponding connector to a host device; a second connector to matewith a corresponding connector on an accessory; and a housing to supportfor the first connector and the second connector and enclosing internalcircuitry, wherein the internal circuitry: detects a connection with ahost device; provides adapter identification and authorizationinformation to the host device; informs the host that the adapter has anadditional port; receives instructions from the host to enable theadditional port and enables the additional port, enters a bypass mode ofoperation; detects connection of an accessory to the additional port;provides a path for the accessory to provide accessory identificationinformation to the host device; and receives instructions from the hostdevice to enter a second mode of operation, wherein the second mode maybe the same or different than the bypass mode of operation.
 17. Theadapter of claim 16 wherein when the second mode is different than thebypass mode, the internal circuitry enters a disconnect mode where theaccessory is disconnected for a predetermined time.
 18. The adapter ofclaim 17 wherein after the adapter enters the second mode, the internalcircuitry informs the host that the adapter is in the second mode. 19.The adapter of claim 16 wherein the adapter provides identification andauthorization information to the host device over a universalasynchronous receiver/transmitter path.
 20. The adapter of claim 19wherein the adapter provides accessory identification information fromthe accessory to the host over a universal serial bus path.